#include "Union_Find_Set.hpp"

int main(){
    vector<vector<vector<int>>> mats;

    for (size_t i = 0; i < 5; i++)
    {
        vector<vector<int>> mat;
        for (size_t j = 0; j < 5 * i + 10; j++)
        {
            vector<int> row;
            for (size_t k = 0; k < 5 * i + 10; k++)
            {
                int x;
                scanf("%d", &x);
                row.push_back(x);
            }
            mat.push_back(row);
        }
        mats.push_back(mat);
    }

    auto calc = Union_Find_Set(mats[0]);
    calc.run();

    calc = Union_Find_Set(mats[1]);
    calc.run();

    calc = Union_Find_Set(mats[2]);
    calc.run();

    calc = Union_Find_Set(mats[3]);
    calc.run();

    calc = Union_Find_Set(mats[4]);
    calc.run();
}